tools/libfsimage: Cleanup makefiles
authorAnthony PERARD <anthony.perard@citrix.com>
Mon, 15 Aug 2022 06:55:21 +0000 (08:55 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 15 Aug 2022 06:55:21 +0000 (08:55 +0200)
commit4aa436df4b0fad1b6cd66ccbbc94915c9d2696a6
tree0d596224b2b8d84e72d925ca4ed603b1c3d173f5
parent290a9b91d9c6411b97d0fef9fcdbf93d125071d3
tools/libfsimage: Cleanup makefiles

Remove the need for "fs-*" targets by creating a "common.mk" which
have flags that are common to libfsimage/common/ and the other
libfsimages/*/ directories.

In common.mk, make $(PIC_OBJS) a recursively expanded variable so it
doesn't matter where $(LIB_SRCS-y) is defined, and remove the extra
$(PIC_OBJS) from libfsimage/common/Makefile.

Use a $(TARGETS) variable to list things to be built. And $(TARGETS)
can be use in the clean target in common.mk.

iso9660/:
    Remove the explicit dependency between fsys_iso9660.c and
    iso9660.h, this is handled automaticaly by the .*.d dependency files,
    and iso9660.h already exist.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Luca Fancellu <luca.fancellu@arm.com>
tools/libfsimage/Rules.mk
tools/libfsimage/common.mk [new file with mode: 0644]
tools/libfsimage/common/Makefile
tools/libfsimage/ext2fs-lib/Makefile
tools/libfsimage/ext2fs/Makefile
tools/libfsimage/fat/Makefile
tools/libfsimage/iso9660/Makefile
tools/libfsimage/reiserfs/Makefile
tools/libfsimage/ufs/Makefile
tools/libfsimage/xfs/Makefile
tools/libfsimage/zfs/Makefile